﻿Imports System.Configuration

Namespace Connection

    Public Class ExecutionEnvironmentElement
        Inherits ConfigurationElement

        ''' <summary>
        ''' DB参照要素
        ''' </summary>
        <ConfigurationProperty("database", IsRequired:=True)>
        Public Property Database() As String
            Get
                Return DirectCast(Me("database"), String)
            End Get
            Set(ByVal value As String)
                Me("database") = value
            End Set
        End Property

        ''' <summary>
        ''' DBMS名
        ''' </summary>
        ''' <remarks>
        ''' #90　DBMS名を管理する
        ''' </remarks>
        <ConfigurationProperty("dbms", IsRequired:=False, DefaultValue:="SqlServer")>
        Public Property DBMS() As DBMS
            Get
                Return DirectCast(Me("dbms"), DBMS)
            End Get
            Set(ByVal value As DBMS)
                Me("dbms") = value
            End Set
        End Property
    End Class

    Public Enum DBMS
        SqlCe
        SqlServer
        SqlServer2012
        Oracle
        MySQL '#97　MySQLに対応する
    End Enum

End Namespace
